package com.syh.app.basic.bindingAdp.edittext;

import android.widget.EditText;

import androidx.databinding.BindingAdapter;

import com.syh.app.basic.utils.Loog;

import java.util.logging.XMLFormatter;

/**
 * 创建者：SYH
 * 时间：2020/4/21 17:16
 * 编辑者：SYH、
 * 标签：
 * 补充说明：EditText DataBinding
 */
public class EditTextBindingAdp {

    @BindingAdapter(value = {"addTextWatcher"}, requireAll = false)
    public static void textWatcher(EditText editText, SimpleTextWatcher textWatcher) {
        Loog.d("EditTextBindingAdp" + editText.toString() + " textWatcher = " + textWatcher);
        editText.addTextChangedListener(textWatcher);
    }

}
